package com.lgcns.andteam2.todaymenu.item;

import com.lgcns.andteam2.todaymenu.R;

import android.content.Context;
import android.text.TextUtils;

public class TodayMenu {
    private int SIDE_MENU_SIZE = 7;
    private int id;
    private int placeId;
    private String menuDate;
    private String menuDay;
    private String gubunCode;
    private String gubun;
    private String corner;
    private String menuName;
    private int cal;
    private String[] sideMenu = new String[SIDE_MENU_SIZE];
    private String dessert;
    
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    public int getPlaceId() {
        return placeId;
    }
    public void setPlaceId(int placeId) {
        this.placeId = placeId;
    }
    public String getMenuDate() {
        return menuDate;
    }
    public void setMenuDate(String menuDate) {
        this.menuDate = menuDate;
    }
    public String getMenuDay() {
        return menuDay;
    }
    public void setMenuDay(String menuDay) {
        this.menuDay = menuDay;
    }
    public String getGubunCode() {
        return gubunCode;
    }
    public void setGubunCode(String gubunCode) {
        this.gubunCode = gubunCode;
    }
    public String getGubun() {
        return gubun;
    }
    public void setGubun(String gubun) {
        this.gubun = gubun;
    }
    public String getCorner() {
        return corner;
    }
    public void setCorner(String corner) {
        this.corner = corner;
    }
    public String getMenuName() {
        return menuName;
    }
    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }
    public int getCal() {
        return cal;
    }
    public void setCal(int cal) {
        this.cal = cal;
    }
    public String getSideMenu01() {
        return sideMenu[0];
    }
    public void setSideMenu01(String sideMenu01) {
        this.sideMenu[0] = sideMenu01;
    }
    public String getSideMenu02() {
        return sideMenu[1];
    }
    public void setSideMenu02(String sideMenu02) {
        this.sideMenu[1] = sideMenu02;
    }
    public String getSideMenu03() {
        return sideMenu[2];
    }
    public void setSideMenu03(String sideMenu03) {
        this.sideMenu[2] = sideMenu03;
    }
    public String getSideMenu04() {
        return sideMenu[3];
    }
    public void setSideMenu04(String sideMenu04) {
        this.sideMenu[3] = sideMenu04;
    }
    public String getSideMenu05() {
        return sideMenu[4];
    }
    public void setSideMenu05(String sideMenu05) {
        this.sideMenu[4] = sideMenu05;
    }
    public String getSideMenu06() {
        return sideMenu[5];
    }
    public void setSideMenu06(String sideMenu06) {
        this.sideMenu[5] = sideMenu06;
    }
    public String getSideMenu07() {
        return sideMenu[6];
    }
    public void setSideMenu07(String sideMenu07) {
        this.sideMenu[6] = sideMenu07;
    }
    public String getDessert() {
        return dessert;
    }
    public void setDessert(String dessert) {
        this.dessert = dessert;
    }
    
    public String getSideMenuList(Context context) {
        StringBuffer sb = new StringBuffer();
        
        for(int i = 0 ; i < SIDE_MENU_SIZE ; i++) {
            if(!TextUtils.isEmpty(sideMenu[i])) {
                if(i > 0) {
                    sb.append("\n");
                }
                sb.append(sideMenu[i]);
            }
        }
        
        if(!TextUtils.isEmpty(dessert)) {
            sb.append("\n");
            sb.append(String.format(context.getString(R.string.dessert), dessert));
        }
        
        return sb.toString();
    }
    
    @Override
    public String toString() {
        return "MenuInfo [id=" + id + ", placeId=" + placeId + ", menuDate="
                + menuDate + ", menuDay=" + menuDay + ", gubunCode="
                + gubunCode + ", gubun=" + gubun + ", corner=" + corner
                + ", menuName=" + menuName + ", cal=" + cal + ", sideMenu01="
                + sideMenu[0] + ", sideMenu02=" + sideMenu[1] + ", sideMenu03="
                + sideMenu[2] + ", sideMenu04=" + sideMenu[3] + ", sideMenu05="
                + sideMenu[4] + ", sideMenu06=" + sideMenu[5] + ", sideMenu07="
                + sideMenu[6] + ", dessert=" + dessert + "]";
    }
    
}
